
import React from 'react';
import ReactDom from 'react-dom';
//----函数组件
/* import AddComponet from  './components/fnComponents/add.js'
import SearchComponet from  './components/fnComponents/search.js'
import ShowList from './components/fnComponents/showList.js' */
//--- 类组件
/* import AddComponet from  './components/classComponents/add.js'
import SearchComponet from  './components/classComponents/search.js'
import ShowList from './components/classComponents/showList.js'
 */
/*let node =(
    <>
   <div>
     <input type='text'></input>
     <button>添加</button>
   </div>
   <div>
     <input type='text'></input>
     <button>搜索</button>
   </div>
   <hr/>
   <ul>
       <li>张三</li>
       <li>李四</li>
       <li>王五</li>
   </ul>
   </> 
);*/

//ReactDom.render(node,document.getElementById("root"))


//组件
/* ReactDom.render(
       <>
         <AddComponet/>
         <SearchComponet/>
         <ShowList/>
       </> 
      ,
    document.getElementById("root")) */

//-----------------props---函数式
/* import Test from './components/fnComponents/test';

ReactDom.render(
            <>
             <Test title='添加选项' name='添加'/>
             <Test/>
             </>,
           document.getElementById("root"))
 */
//-------类组件porps-------------
//import Test2 from './components/classComponents/test2.js';
import Test3 from './components/classComponents/test3.js';

ReactDom.render(
            <>
             <Test3 name="添加" title='添加选项'/>
             <Test3 name='搜索'/>
             </>,
           document.getElementById("root"))
 
